package com.lxg.service.impl;

import com.lxg.dao.BookDao;
import com.lxg.service.BookService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

/**
 * @author 陆小根
 * date: 2022/04/23
 * Description:
 */

public class BookServiceImpl implements BookService, InitializingBean, DisposableBean {

  private BookDao bookDao;

  @Override
  public void save() {
    bookDao.save();
    System.out.println("bookService save...");
  }


  public void setBookDao(BookDao bookDao) {
    System.out.println("set ....");
    this.bookDao = bookDao;
  }

  @Override
  public void destroy() throws Exception {
    System.out.println("service destroy ....");
  }

  @Override
  public void afterPropertiesSet() throws Exception {
    System.out.println("service init....");
  }
}
